//
//  TrafficCtrl.m
//  LvXingPai
//
//  Created by _Junxee on 16/8/13.
//  Copyright © 2016年 _Junxee. All rights reserved.
//

#import "TrafficCtrl.h"

@interface TrafficCtrl ()

@end

@implementation TrafficCtrl

- (void)viewDidLoad {
    [super viewDidLoad];
    [self AddWebView];
    [self setBarButStyle];
}

-(void)setTModel:(DestinModel *)tModel{
    _tModel = tModel;
}

-(void)AddWebView{
    
    UIWebView *webView = [[UIWebView alloc]initWithFrame:self.view.bounds];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://h5.taozilvxing.com/city/traff-list.php?tid=%@",_tModel.pushId]]];
    [webView loadRequest:request];
    [self.view addSubview:webView];
}


-(void)setBarButStyle{
    UIBarButtonItem *leftBtn = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"common_icon_navigation_back_normal"] style:UIBarButtonItemStylePlain target:self action:@selector(backAction:)];
    self.navigationItem.leftBarButtonItem = leftBtn;
}

-(void)backAction:(UIBarButtonItem *)sender{
    [self.navigationController popViewControllerAnimated:YES];
}

@end
